<?php

namespace app\common\validate;

use think\Validate;

class Letter extends Validate {

    protected $rule = [
        'id' => 'require|number',
    ];
    protected $field = [
        'id' => 'id',
        
    ];
    protected $scene = [

        'letterinfo' => ['id'],
        'firstlist' => ['count', 'page'],
    ];



    // 自定义验证规则
    protected function checkguess_4($value, $rule, $data) {
        $count = count(explode(";", $value));
        if ($count == 4) {
            return true;
        } else {
            return '请选择4强完整对阵';
        }
    }

}
